3.5 \(\int \frac {(d+e x) (a+b \log (c x^n))}{x} \, dx\)

Optimal. Leaf size=44 \[ \frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+a e x+b e x \log \left (c x^n\right )-b e n x \]

[Out]

a*e*x-b*e*n*x+b*e*x*ln(c*x^n)+1/2*d*(a+b*ln(c*x^n))^2/b/n

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2346, 2301, 2295} \[ \frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+a e x+b e x \log \left (c x^n\right )-b e n x \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(a + b*Log[c*x^n]))/x,x]

[Out]

a*e*x - b*e*n*x + b*e*x*Log[c*x^n] + (d*(a + b*Log[c*x^n])^2)/(2*b*n)

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rubi steps

\begin {align*} \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=d \int \frac {a+b \log \left (c x^n\right )}{x} \, dx+e \int \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=a e x+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+(b e) \int \log \left (c x^n\right ) \, dx\\ &=a e x-b e n x+b e x \log \left (c x^n\right )+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 43, normalized size = 0.98 \[ a d \log (x)+a e x+\frac {b d \log ^2\left (c x^n\right )}{2 n}+b e x \log \left (c x^n\right )-b e n x \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n]))/x,x]

[Out]

a*e*x - b*e*n*x + a*d*Log[x] + b*e*x*Log[c*x^n] + (b*d*Log[c*x^n]^2)/(2*n)

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 45, normalized size = 1.02 \[ \frac {1}{2} \, b d n \log \relax (x)^{2} + b e x \log \relax (c) - {\left (b e n - a e\right )} x + {\left (b e n x + b d \log \relax (c) + a d\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x,x, algorithm="fricas")

[Out]

1/2*b*d*n*log(x)^2 + b*e*x*log(c) - (b*e*n - a*e)*x + (b*e*n*x + b*d*log(c) + a*d)*log(x)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 49, normalized size = 1.11 \[ b n x e \log \relax (x) + \frac {1}{2} \, b d n \log \relax (x)^{2} - b n x e + b x e \log \relax (c) + b d \log \relax (c) \log \relax (x) + a x e + a d \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x,x, algorithm="giac")

[Out]

b*n*x*e*log(x) + 1/2*b*d*n*log(x)^2 - b*n*x*e + b*x*e*log(c) + b*d*log(c)*log(x) + a*x*e + a*d*log(x)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 46, normalized size = 1.05 \[ -b e n x +b e x \ln \left (c \,{\mathrm e}^{n \ln \relax (x )}\right )+a d \ln \relax (x )+a e x +\frac {b d \ln \left (c \,{\mathrm e}^{n \ln \relax (x )}\right )^{2}}{2 n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(b*ln(c*x^n)+a)/x,x)

[Out]

ln(x)*a*d+a*e*x+b*e*x*ln(c*exp(n*ln(x)))+1/2*b*d/n*ln(c*exp(n*ln(x)))^2-b*e*n*x

________________________________________________________________________________________

maxima [A]  time = 0.74, size = 41, normalized size = 0.93 \[ -b e n x + b e x \log \left (c x^{n}\right ) + a e x + \frac {b d \log \left (c x^{n}\right )^{2}}{2 \, n} + a d \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x,x, algorithm="maxima")

[Out]

-b*e*n*x + b*e*x*log(c*x^n) + a*e*x + 1/2*b*d*log(c*x^n)^2/n + a*d*log(x)

________________________________________________________________________________________

mupad [B]  time = 3.59, size = 40, normalized size = 0.91 \[ a\,d\,\ln \relax (x)+e\,x\,\left (a-b\,n\right )+b\,e\,x\,\ln \left (c\,x^n\right )+\frac {b\,d\,{\ln \left (c\,x^n\right )}^2}{2\,n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*x^n))*(d + e*x))/x,x)

[Out]

a*d*log(x) + e*x*(a - b*n) + b*e*x*log(c*x^n) + (b*d*log(c*x^n)^2)/(2*n)

________________________________________________________________________________________

sympy [A]  time = 0.51, size = 58, normalized size = 1.32 \[ a d \log {\relax (x )} + a e x + \frac {b d n \log {\relax (x )}^{2}}{2} + b d \log {\relax (c )} \log {\relax (x )} + b e n x \log {\relax (x )} - b e n x + b e x \log {\relax (c )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))/x,x)

[Out]

a*d*log(x) + a*e*x + b*d*n*log(x)**2/2 + b*d*log(c)*log(x) + b*e*n*x*log(x) - b*e*n*x + b*e*x*log(c)

________________________________________________________________________________________